#pragma once
#include "stdafx.h"
#include "resource.h"
#include "afxwin.h"
#include "TpEdit.h"

// CScreenDlg dialog

class CScreenDlg : public CDialog
{
	DECLARE_DYNAMIC(CScreenDlg)

public:
	CScreenDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CScreenDlg();
	CDC			m_dcMem;
	CSize		m_size;      // screen size
	CBitmap		m_bmpScreen; // the screen bitmap
	CBitmap		m_bmpInfoBK;
	CPoint		m_ptMouse;   //mouse position
	
	CRect		m_rectInfo;
	BOOL		m_bSelectRgn;
	BOOL		m_bEnd;
	CRect		m_rectSelect;
	CRect		m_rectDraw;
	CPoint		m_ptDrawLine_S;
	CPoint		m_ptDrawLine_E;
	CPoint		m_ptOldPoint;
	BOOL		m_bSelectOK;
	HCURSOR		m_hCursor;
	BOOL		m_bIsDraw;
	BOOL		m_bIsAddWord;
	BOOL		m_bIsMoveRect;
	BYTE		m_byMoveType;

	HBRUSH		br;
// Dialog Data
	enum { IDD = IDD_DIALOG_SCREEN };
	
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	DECLARE_MESSAGE_MAP()

public:
	virtual BOOL OnInitDialog();
	void DisplayInfo(void);
	void DrawInfo(void);
	void OnBnClickedButtonCencle();
	void SaveSelectBmp(void);
protected:
	virtual void OnOK();
	CButton Bt_CancelCapScr;
	CButton Radio_Rect;
	CButton Radio_Pen;
	CButton Radio_Word;
	unsigned int uiDrawType;
	//CTpEdit m_tpedit;

	afx_msg void OnPaint();
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnBnClickedRadioPen();
	afx_msg void OnBnClickedRadioRect();
	afx_msg void OnBnClickedRadioWord();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
public:
	CString m_strEdit;
	afx_msg void OnBnClickedButtonSave();
	CButton Bt_save;
};
